{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a62a5e69",
   "metadata": {},
   "outputs": [],
   "source": [
    "import csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6ed5181b",
   "metadata": {},
   "outputs": [],
   "source": [
    "path = 'data.csv'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "68f7d52d",
   "metadata": {},
   "outputs": [],
   "source": [
    "attribute_name = ['RotateX', 'RotateY', 'RotateZ']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ca14538f",
   "metadata": {},
   "outputs": [],
   "source": [
    "vuale_test = [\n",
    "    [30,0,0],\n",
    "    [0,30,0],\n",
    "    [0,0,30],\n",
    "    [1,1,1],\n",
    "    [10,10,10]\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "f7a23113",
   "metadata": {},
   "outputs": [],
   "source": [
    "with open(path, 'w', newline='') as w:\n",
    "    w_csv = csv.writer(w)\n",
    "    w_csv.writerow(attribute_name)\n",
    "    w_csv.writerows(vuale_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "9d88ea1f",
   "metadata": {},
   "outputs": [],
   "source": [
    "list_open = []\n",
    "with open(path) as csvfile:\n",
    "    sp  = csv.reader(csvfile,)\n",
    "    for i in sp:\n",
    "        list_open.append(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "68f3d217",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['RotateX', 'RotateY', 'RotateZ'],\n",
       " ['30', '0', '0'],\n",
       " ['0', '30', '0'],\n",
       " ['0', '0', '30'],\n",
       " ['1', '1', '1'],\n",
       " ['10', '10', '10']]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list_open"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "55626781",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['30', '0', '0']"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list_open[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "086ab114",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(list_open[1][0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "22f11d79",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
